<html>
    <body>
        <p>1111111111111</p>
    </body>
    <script>
        document.onkeydown = function(event){
            if(event.keyCode == 13){
                alert("回车")
            }
            if(event.keyCode == 27){
                alert("不知道")
            }
        }
    </script>
</html>